<template>
	<view class="content">
			<view class="postings">
				<view class="post_con">
					<text>绿化区域</text>
					<text>{{data.areaName}}</text>
				</view>
				<view class="post_con">
					<text>天气</text>
					<text>{{data.weather}}</text>
				</view>
				<view class="post_con">
					<text>温度</text>
					<text>{{data.temperature}} ℃</text>
				</view>
				<view class="post_con post_col">
					<text>绿化内容</text>
					<text>{{data.content}}</text>
				</view>
				<view class="post_con post_col">
					<text>备注</text>
					<text>{{data.remark}}</text>
				</view>
			</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				data:{}
			};
		},
		onLoad(option) {
			// this.getTitle(option.date)
			this.getInfo(option.id)
		},
		methods: {
			getInfo(id){
				let that=this
				//联网加载数据
				this.apis.greencleanApi.buiGreenRecord(id).then(res => {
					this.data=res.data
					this.getTitle(this.data.createTime)
				}).catch(()=>{
					//联网失败的回调,隐藏下拉刷新的状态
				})
			},
			
				getTitle(title) {
					uni.setNavigationBarTitle({
						title: title.substring(0,10)+'绿化'
					});
				}
		}
	}
</script>

<style lang="scss" scoped>
$subheadColor:#111111;
$titleColor:#333333;
@mixin boldTitle {
	font-size: 28rpx;
	font-weight: 500;
	color: #666666;
}
@mixin  bordcon {
	font-size: 28rpx;
	font-weight: 500;
	color: #333333;
}
@mixin  padding {
			padding: 30rpx 0;
}
.content{
	padding: 20rpx;
	box-sizing: border-box;
	.postings{
		display: flex;
		flex-direction: column;
		background: #FFFFFF;
		padding: 0 32rpx;
		margin-bottom: 20rpx;
		border-radius: 12rpx;
		box-sizing: border-box;
		.post_title{
			@include bordcon
			@include padding
		}
		.post_con{
			display: flex;
			justify-content: space-between;
			border-bottom: 1rpx solid #EEEEEE;
			@include padding
			text:nth-child(1){
				@include boldTitle
			}
			text:nth-child(2){
				@include bordcon
			}
		}
		.post_col{
			display: flex;
			flex-direction: column;
			text:nth-child(1){
				margin-bottom: 20rpx;
			}
		}
		view:last-child{
			border-bottom: none;
		}
	}
}
</style>
